#include <iostream>  
#include <vector>  
#include <queue>  
using namespace std;  
int BFS(vector<vector<int> >&, int v);  
int main() {  
    int n, m, i, v1, v2, count;   
    scanf("%d %d\n", &n, &m);  
    vector<vector<int> > graph(n);  
    for (i = 0;i < m;i++) {  
        scanf("%d %d", &v1, &v2);  
        graph[v1-1].push_back(v2-1);  
        graph[v2-1].push_back(v1-1);  
    }  
    for (i = 0;i < n;i++) {  
        count = BFS(graph, i);  
        printf("%d: %.2f%%\n", i + 1, count*100.0 / n);  
    }  
}  
  
int BFS(vector<vector<int> > &g, int v) {  
    int count = 1, level = 0, last = v, w, tail;  
    queue<int> q;  
    vector<int> visited(g.size(), 0);  
    q.push(v);  
    visited[v] = 1;  
    while (!q.empty()) {  
        v = q.front();  
        q.pop();  
        for (size_t i = 0;i < g[v].size();i++) {  
            w = g[v][i];  
            if (!visited[w]) {  
                visited[w] = 1;  
                count++;  
                q.push(w);  
                tail = w;  
            }  
        }  
        if (v == last) {  
            level++;  
            last = tail;  
        }     
        if (level == 6) break;  
    }  
    return count;  
}  
